package com.zwh.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zwh.bean.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EmpDao extends BaseMapper<Emp> {
@Select("select e.emp_id, e.emp_name, e.gender, e.email, e.d_id,d.dept_id,d.dept_name from tbl_emp e left join tbl_dept d on e.`d_id`=d.`dept_id`")
    Page<Emp> selectEmpAndDept(IPage<Emp> page);
}
